package com.krmes.mes.util;

/**
 * Created by Administrator on 2017-03-09.
 */

public class Utils {

    private static long lastClickTime;
    //android中button点击频率控制
    public static boolean isFastDoubleClick() {
        long time = System.currentTimeMillis();
        long timeD = time - lastClickTime;
        if ( 0 < timeD && timeD < 500) {       //500毫秒内按钮无效，这样可以控制快速点击，自己调整频率
            return true;
        }
        lastClickTime = time;
        return false;
    }
}
